During uptodate ness check with buildInfo, check if there are errors explicitly with noEmit#50974
Conversation
… in the program to determine uptodateness Fixes #50959
| if (buildInfo.program) { | ||
| // If there are pending changes that are not emitted, project is out of date | ||
| // If noEmit, then explicitly check if there are semantic diagnostics | ||
| // affectedFilesPendingEmit is present in noEmit irrespective of errors to handle files to be emitted when noEmit is false, |
There was a problem hiding this comment.
This helps me understand why affectedFilesPendingEmit behaves differently under noEmit, but I don’t understand why that makes checking for the presence of semantic errors the correct fallback. Why does the presence of semantic errors definitely mean the buildinfo is out of date? Why isn’t the same true of syntactic errors?
There was a problem hiding this comment.
If program has syntactic errors the changeFileSet because semantic diagnostics are not even processed in that case and state remains same. (https://github.com/microsoft/TypeScript/pull/50974/files#diff-2461280d51916bf4023650d8950c0af3bf16011e3f0c8a290c7c9f70056147a0R77) I will update the comment
|
Do we know when this fix will be released? Looks like it didn't quite make it into 4.8.4. We are stuck on 4.7 until it's out. |
Fixes #50959